<?php
// http://210.118.69.147:8888/SBWebServer/parent_applist_sender.php/?parent_num=1
include("../Action/config.php");

//preparing...
// $data = file_get_contents("php://input");
// $urldecode_data = urldecode($data);
// $array_data = json_decode($urldecode_data, true);

//get parent_num who want to crawl data of app list
$child_num = $_GET['child_num'];
// $parent_num = $array_data['parent_num'];

$sql = "SELECT * FROM APP_INFO 
	WHERE child_num='$child_num'";
$result = mysql_query($sql);
$app_list = array();

while($row = mysql_fetch_array($result)){
	$app_name = $row['app_name'];
	$package_name = $row['package_name'];
	$forbidden = $row['forbidden'];
	$app_list[] = array("app_name"=>$app_name, 
		"package_name"=>$package_name, "forbidden"=>$forbidden);
}

$json_app_list = json_encode($app_list);
echo $json_app_list;
exit();

?>


